Answer:

Yes. Until a few decades ago few people believed that this was possible. One of the intellectual goals of this course is for you to understand how machines can follow instructions.

Example Program

A QBasic program consists of lines of text, one after another, like a poem. Each line of a program (or a poem) stays by itself on one line. A line which has an instruction for the computer is called a statement. Not all lines are statements. Some lines are blank. Others are comments intended for a human reader, but not for the computer. Only a line that contains an instruction for the computer is a statement.

Usually the computer runs a program starting with the first statement and proceeding statement by statement until the end of the program is reached.

Here is a complete QBasic program as you see it when you are working with the QBasic system:

Look in Appendix B to see how to enter and run programs. You don't have to do that now to read this chapter. The picture shows many details that are not important right now. The QBasic program is just these two lines:

PRINT 10 + 5
END

The PRINT statement causes something to be printed on the screen of the computer monitor. The last statement in the program is END, which just tells the computer that the program is finished.

QUESTION 3:

How many statements are in this program?